package com.why.service.Impl;

import com.why.pojo.User;
import com.why.service.UserService;
import org.apache.dubbo.config.annotation.Service;

@Service//将这这类提供的方法(服务)对外发布，将访问的地址,ip,端口,路径注册到注册中心中
//新版本的Dubbo使用@DubboService
public class UserServiceImpl implements UserService {
    @Override
    public String say() {
        return "Hello Dubbo! hello";
    }

    @Override
    public User findUserById(int id) {
        //查询User对象
        User user = new User(1, "zhangsan", "123");
        return user;
    }
}
